package com.yiwei.hdb.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.yiwei.hdb.R;
import com.yiwei.hdb.adapter.base.ItemAdapter;
import com.yiwei.hdb.api.bean.OtherIdentityBean;
import com.yiwei.hdb.model.AlertModel;
import com.yiwei.hdb.model.MoneyRewardModel;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2016/10/17 0017.
 */

public class OtherIdentityAdapter extends ItemAdapter<OtherIdentityBean, OtherIdentityAdapter.InviteRecordViewHolder> {

    private Context context;

    public OtherIdentityAdapter(Context context) {
        super(context);
        this.context = context;
    }

    @Override
    public InviteRecordViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new InviteRecordViewHolder(inflate(R.layout.item_other_identity, parent));
    }

    @Override
    public void onBindViewHolder(InviteRecordViewHolder holder, int position) {
        OtherIdentityBean item = getItem(position);
        Glide.with(context).load(item.icons).into(holder.imgIcon);

        holder.txtTitle.setText(item.title);
        holder.txtContent.setText(item.desc);
    }


    class InviteRecordViewHolder extends RecyclerView.ViewHolder {
        @BindView(R.id.img_icon)
        ImageView imgIcon;
        @BindView(R.id.txt_title)
        TextView txtTitle;
        @BindView(R.id.txt_content)
        TextView txtContent;

        public void bindData() {

        }

        private InviteRecordViewHolder(View itemView) {
            super(itemView);
            ButterKnife.bind(this, itemView);
        }


    }
}
